<template>
	<u-tabbar :value="cur" @change="onTabbarChange">
		<u-tabbar-item v-for="item in tablist" :key="item.id" :text="item.text" :icon="item.icon" :name="item.name"></u-tabbar-item>
	</u-tabbar>
</template>

<script>
	export default {
		props: {
			cur: {
				type: String,
				default: 'emjio'
			}
		},
		data() {
			return {
				tablist: [
					{
						id: 0,
						text: '表情包',
						icon: 'server-man',
						name: 'emjio'
					},
					{
						id: 1,
						text: '表情融合',
						icon: 'chrome-circle-fill',
						name: 'emojiFusion'
					},
					{
						id: 2,
						text: '其他',
						icon: 'photo',
						name: 'play'
					}
				]
			}
		},
		methods: {
			onTabbarChange(idx) {
				uni.switchTab({
					url: `/pages/${idx}/${idx}`
				})
			}
		}
	}
</script>

<style>
</style>